package com.icehand.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;

/**
 *
 * Created by icehand on 2017/5/12.
 */
@Configuration
@EnableScheduling
public class SchedulingConfig {
	@Scheduled(cron = "0/20 * * * * ?")
	public void scheduler(){
		System.out.println("Scheduling one run:"+System.currentTimeMillis());
	}

	@Scheduled(cron = "0/10 * * * * ?")
	public void runOtherTask(){
		System.out.println("Scheduling two run:"+System.currentTimeMillis());
	}
}
